package com.system.FinancialDepartment.web;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.system.AttendanceCherkDepartment.entity.Attendance;
import com.system.AttendanceCherkDepartment.service.IAttendanceService;
import com.system.FinancialDepartment.entity.Performance;
import com.system.FinancialDepartment.entity.RewardAndPunishiment;
import com.system.FinancialDepartment.service.IPerformanceService;
import com.system.FinancialDepartment.service.IRewardAndPunishimentService;
import com.system.common.util.ExtPageable;

@Controller
@RequestMapping("/financial")
public class FinancialController {

	@Autowired
	private IRewardAndPunishimentService rapService;
	@Autowired
	private IPerformanceService performanceService;
	@Autowired
	private IAttendanceService attendanceService;
	
	@RequestMapping("/rap/findAllById")
	public @ResponseBody Page<RewardAndPunishiment> rapFindAllById(ExtPageable extPageable) 
	{
		Long empId=12L;////传前端数据
			return rapService.findAll(empId,extPageable.getPageable());
	}
	
	@RequestMapping("/performance/findAllById")
	public @ResponseBody Page<Performance> pfmFindAllById(ExtPageable extPageable) 
	{
		Long empId=12L;////传前端数据
			return performanceService.findAll(empId,extPageable.getPageable());
	}
	

	@RequestMapping("/salary/findAllById")
	public @ResponseBody ArrayList<Attendance> findAllById() 
	{

			return attendanceService.findAllByOwner();
			
	}
	
	
	
}
